// 多玩法规则工具
const RULES_MAP = {
  '中式九球': {
    maxGames: 9,
    winCondition: (scoreA, scoreB) => {
      if (scoreA >= 5) return 'A';
      if (scoreB >= 5) return 'B';
      return null;
    }
  },
  '美式九球': {
    maxGames: 9,
    winCondition: (scoreA, scoreB) => {
      if (scoreA >= 5) return 'A';
      if (scoreB >= 5) return 'B';
      return null;
    }
  },
  '十六彩': {
    maxGames: 7,
    winCondition: (scoreA, scoreB) => {
      if (scoreA >= 4) return 'A';
      if (scoreB >= 4) return 'B';
      return null;
    }
  }
};
module.exports = {
  getRules(mode) {
    return RULES_MAP[mode] || RULES_MAP['中式九球'];
  }
};
